#pragma once

#include "../object.h"

namespace bevdet::tracker {

class AssociateFactor {
public:
    AssociateFactor(std::string name, int32_t weight);
    virtual int32_t assessScore(const Object&, const Object&) const = 0;

    std::string getName(void) const;
    int32_t getWeight(void) const;

private:
    std::string name_;
    int32_t weight_;
};

class PositionXAssociateFactor : public AssociateFactor {
public:
    PositionXAssociateFactor(std::string name, double weight, double dxThreshold);
    int32_t assessScore(const Object&, const Object&) const;

private:
    double dxThreshold_ { 5.0 };
};

class PositionYAssociateFactor : public AssociateFactor {
public:
    PositionYAssociateFactor(std::string name, double weight, double dyThreshold);
    int32_t assessScore(const Object&, const Object&) const;

private:
    double dyThreshold_ { 5.0 };
};

class HeadingAssociateFactor : public AssociateFactor {
public:
    HeadingAssociateFactor(std::string name, double weight, double headingThreshold);
    int32_t assessScore(const Object&, const Object&) const;

private:
    double headingThreshold_ { 90.0 };
};

}